use salvo::oapi::ToSchema;
use serde::Deserialize;
use validator::Validate;

#[derive(Debug, Deserialize, ToSchema, Default, Validate)]
pub struct SearchRequest {
    #[validate(length(min = 1, message="query must be at least 1 character long"))]
    pub query: String,
    #[validate(range(min = 1, message="top can not be 0 or less"))]
    pub top: usize,
}